include($$TGT/../../config.txt)

unix {
  LIBS = -lGLEW $$LIBS

  INCLUDEPATH += /usr/local/include
  LIBDIR += /usr/local/lib
}

win32 {
  DEFINES += GLEW_STATIC
  INCLUDEPATH += $$TGT/windows/glew/include
  LIBS = "$$TGT/windows/glew/lib/debug/glew32s.lib" $$LIBS
}

macx {
  # support for macports
  INCLUDEPATH += /opt/local/include
  LIBDIR += /opt/local/lib
}


devil {
  DEFINES += TGT_HAS_DEVIL
  unix: LIBS += -lIL

  win32 {
    INCLUDEPATH += $$TGT/windows/il/include
    LIBS += $$TGT/windows/il/lib/DevIL.lib

    # copy DevIL DLL into the output directory
    DEVILDLL = ..\common\tgt\windows\il\lib\devil.dll
    devildll_debug.target = debug\devil.dll
    devildll_debug.commands = copy $$DEVILDLL debug
    devildll_release.target = release\devil.dll
    devildll_release.commands = copy $$DEVILDLL release
    QMAKE_EXTRA_TARGETS += devildll_debug devildll_release
    POST_TARGETDEPS += debug\devil.dll release\devil.dll

    # copy jpeg DLL into the output directory
    JPEGDLL = ..\common\tgt\windows\il\lib\jpeg62.dll
    jpegdll_debug.target = debug\jpeg62.dll
    jpegdll_debug.commands = copy $$JPEGDLL debug
    jpegdll_release.target = release\jpeg62.dll
    jpegdll_release.commands = copy $$JPEGDLL release
    QMAKE_EXTRA_TARGETS += jpegdll_debug jpegdll_release
    POST_TARGETDEPS += debug\jpeg62.dll release\jpeg62.dll
  }
}

QMAKE_RPATHDIR += $${LIBDIR}
for(dir, LIBDIR) {
  LIBS += "-L$$dir"
}

INCLUDEPATH += $$TGT/..
DEFINES += TGT_WITHOUT_DEFINES

SOUfRCES += \
    $$TGT/assert.cpp \
    $$TGT/bounds.cpp \
    $$TGT/camera.cpp \
    $$TGT/curve.cpp \
    $$TGT/exception.cpp \
    $$TGT/filesystem.cpp \
    $$TGT/frustum.cpp \
    $$TGT/glcanvas.cpp \
    $$TGT/gpucapabilities.cpp \
    $$TGT/guiapplication.cpp \
    $$TGT/init.cpp \
    $$TGT/light.cpp \
    $$TGT/logmanager.cpp \
    $$TGT/memorymanager.cpp \
    $$TGT/mesh.cpp \
    $$TGT/model.cpp \
    $$TGT/painter.cpp \
    $$TGT/shadermanager.cpp \
    $$TGT/skybox.cpp \
    $$TGT/spline.cpp \
    $$TGT/stopwatch.cpp \
    $$TGT/stringutil.cpp \
    $$TGT/submesh.cpp \
    $$TGT/tesselator.cpp \
    $$TGT/texture.cpp \
    $$TGT/texturemanager.cpp \
    $$TGT/texturereader.cpp \
    $$TGT/texturereaderdevil.cpp \
    $$TGT/texturereadertga.cpp \
    $$TGT/tgt_gl.cpp \
    $$TGT/timer.cpp \
    $$TGT/ziparchive.cpp \
    $$TGT/event/eventhandler.cpp \
    $$TGT/event/eventlistener.cpp \
    $$TGT/event/keyevent.cpp \
    $$TGT/event/mouseevent.cpp \
    $$TGT/event/timeevent.cpp \
    $$TGT/navigation/navigation.cpp \
    $$TGT/navigation/topviewnavigation.cpp \
    $$TGT/navigation/trackball.cpp \
    $$TGT/navigation/walknavigation.cpp


SOURCES += \
    $$TGT/assert.cpp \
    $$TGT/bounds.cpp \
    $$TGT/camera.cpp \
    $$TGT/curve.cpp \
    $$TGT/exception.cpp \
    $$TGT/filesystem.cpp \
    $$TGT/frustum.cpp \
    $$TGT/glcanvas.cpp \
    $$TGT/gpucapabilities.cpp \
    $$TGT/guiapplication.cpp \
    $$TGT/init.cpp \
    $$TGT/light.cpp \
    $$TGT/logmanager.cpp \
    $$TGT/memorymanager.cpp \
    $$TGT/mesh.cpp \
    $$TGT/model.cpp \
    $$TGT/painter.cpp \
    $$TGT/shadermanager.cpp \
    $$TGT/skybox.cpp \
    $$TGT/spline.cpp \
    $$TGT/stopwatch.cpp \
    $$TGT/stringutil.cpp \
    $$TGT/submesh.cpp \
    $$TGT/tesselator.cpp \
    $$TGT/texture.cpp \
    $$TGT/texturemanager.cpp \
    $$TGT/texturereader.cpp \
    $$TGT/texturereaderdevil.cpp \
    $$TGT/texturereadertga.cpp \
    $$TGT/tgt_gl.cpp \
    $$TGT/timer.cpp \
    $$TGT/ziparchive.cpp \
    $$TGT/event/eventhandler.cpp \
    $$TGT/event/eventlistener.cpp \
    $$TGT/event/keyevent.cpp \
    $$TGT/event/mouseevent.cpp \
    $$TGT/event/timeevent.cpp \
    $$TGT/glut/glutapplication.cpp \
    $$TGT/glut/glutcanvas.cpp \
    $$TGT/glut/glutmouse.cpp \
    $$TGT/glut/gluttimer.cpp \
    $$TGT/glut/toolkitfactory.cpp \
    $$TGT/navigation/navigation.cpp \
    $$TGT/navigation/topviewnavigation.cpp \
    $$TGT/navigation/trackball.cpp \
    $$TGT/navigation/walknavigation.cpp

HEADERS += \
    $$TGT/assert.h \
    $$TGT/attribute.h \
    $$TGT/bounds.h \
    $$TGT/camera.h \
    $$TGT/config.h \
    $$TGT/curve.h \
    $$TGT/exception.h \
    $$TGT/filesystem.h \
    $$TGT/frustum.h \
    $$TGT/glcanvas.h \
    $$TGT/glmath.h \
    $$TGT/gpucapabilities.h \
    $$TGT/guiapplication.h \
    $$TGT/init.h \
    $$TGT/light.h \
    $$TGT/line.h \
    $$TGT/logmanager.h \
    $$TGT/manager.h \
    $$TGT/material.h \
    $$TGT/math.h \
    $$TGT/matrix.h \
    $$TGT/memorymanager.h \
    $$TGT/mesh.h \
    $$TGT/model.h \
    $$TGT/mouse.h \
    $$TGT/painter.h \
    $$TGT/plane.h \
    $$TGT/quadric.h \
    $$TGT/quadtree.h \
    $$TGT/quaternion.h \
    $$TGT/renderable.h \
    $$TGT/shadermanager.h \
    $$TGT/singleton.h \
    $$TGT/skybox.h \
    $$TGT/spline.h \
    $$TGT/stopwatch.h \
    $$TGT/stringutil.h \
    $$TGT/submesh.h \
    $$TGT/tesselator.h \
    $$TGT/texture.h \
    $$TGT/texturemanager.h \
    $$TGT/texturereaderdevil.h \
    $$TGT/texturereader.h \
    $$TGT/texturereadertga.h \
    $$TGT/tgt_gl.h \
    $$TGT/tgt.h \
    $$TGT/timer.h \
    $$TGT/toolkitfactory.h \
    $$TGT/types.h \
    $$TGT/vector.h \
    $$TGT/vertex.h \
    $$TGT/ziparchive.h \
    $$TGT/event/event.h \
    $$TGT/event/eventhandler.h \
    $$TGT/event/eventlistener.h \
    $$TGT/event/exitevent.h \
    $$TGT/event/keyevent.h \
    $$TGT/event/mouseevent.h \
    $$TGT/event/timeevent.h \
    $$TGT/glut/glutapplication.h \
    $$TGT/glut/glutcanvas.h \
    $$TGT/glut/glutmouse.h \
    $$TGT/glut/gluttimer.h \
    $$TGT/glut/tgt_glut.h \
    $$TGT/navigation/navigation.h \
    $$TGT/navigation/topviewnavigation.h \
    $$TGT/navigation/trackball.h \
    $$TGT/navigation/walknavigation.h

